//
//  WebViewController.m
//  webview
//
//  Created by apple on 16/11/21.
//  Copyright © 2016年 xiong. All rights reserved.
//

#import "WebViewController.h"

@interface WebViewController () <UIWebViewDelegate,UISearchBarDelegate>
@property (weak, nonatomic) IBOutlet UIWebView *web;
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *av;

@end

@implementation WebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UISearchBar * Search=[UISearchBar new];
    self.navigationItem.titleView=Search;
    Search.delegate=self;
    NSURL *url=[NSURL URLWithString:@"http://girigiri.love/"];
    NSURLRequest *req=[NSURLRequest requestWithURL:url];
    self.web.delegate=self;
    [self.web loadRequest:req];
    [self.av startAnimating];
}

- (void) webViewDidFinishLoad:(UIWebView *)webView
{
    [self.av stopAnimating];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
